Skip to main content

Influx Database actions

1. About Add Data:

This connector can be used to add data records in your bucket using line protocol.

DB_URL Provide your influx database host.

Token Provide your influx database access token.

Bucket_Name Provide your bucket name in which data needs to be added.

Org_Name Provide the organization name of the bucket.

Precision Select the required precision from drop-down list.

Measurement Provide influx measurement name.

Tags Provide tag value to be added in records.

Fields Provide field value to be added in records.

Following message properties can be used to override the connector properties if provided.

  • msg.payload.influxDbUrl => DB_URL
  • msg.payload.bucketName => Bucket_Name
  • msg.payload.orgName => Org_Name
  • msg.payload.precision => Precision
  • msg.payload.token => Token
  • msg.payload.measurement => Measurement
  • msg.payload.tags => Tags
  • msg.payload.fields => Fields
Influx DB properties expected by the connector:
PropertyTypeRequired
DB_URLStringYes
Bucket_NameStringYes
Org_NameStringYes
PrecisionStringYes
TokenStringYes
MeasurementStringYes
TagsStringYes
FieldsStringYes

Sample tags value input format

[{"tagKey":"cats","tagValue":"4"}]

Sample field value input format

[{"fieldKey":"animal","fieldValue":"5"}]

2. About Add Item:

This connector provides you the feature to create various items in the influx database.

  • Bucket
  • Dashboard
  • Label
  • Notification Rule
  • Notofication End Points
  • Organization
  • Task
  • User
  • Variable

DB_URL Provide your influx database host.

Token Provide your influx database access token.

Item Select the item you want to create from a provided list

Body Provide the body query for the required item in JSON format

Following message properties can be used to override the connector properties if provided.

  • msg.payload.influxDbUrl => DB_URL
  • msg.payload.token => Token
  • msg.payload.item => Item
  • msg.payload.body => Body

Bucket body sample

{
"description": "",
"name": "yourBucketName",
"orgID": "yourOrganizationId",
"retentionRules": [
{
"type": "expire",
"everySeconds": 0,
"shardGroupDurationSeconds": 0
}
],
"schemaType": "implicit"
}

Dashboard body sample

{
"orgID": "yourOrganizationId",
"name": "yourDashboadName",
"description": ""
}

Label body sample

{
"orgID": "yourOrganizationId",
"name": "yourLabelName",
"properties": {
"color": "F3F3F3",
"description": ""
}
}

Notification Rule body sample

{
"name": "yourNotificationRuleName",
"endpointID": "000000000000aaaa",
"orgID": "yourOrganizationId",
"ownerID": "000000000000aaaa",
"every": "10m",
"offset": "0s",
"runbookLink": "",
"statusRules": [
{
"currentLevel": "INFO",
"previousLevel": null
}
],
"channel": "",
"messageTemplate": "Notification Rule: ${ r._notification_rule_name } triggered by check: ${ r._check_name }: ${ r._message }",
"type": "slack",
"labels": [],
"status": "active"
}

Notification EndPoint body sample

{
"name": "yourNotificationEndPointName",
"description": "",
"orgID": "yourOrganizationId",
"status": "active",
"url": "https://hooks.slack.com/services/X/X/X",
"token": "",
"type": "slack",
"labels": []
}

Organization body sample

{
"name": "yourOrganizationName",
"description": "",
"status": "active"
}

Task body sample

{
"orgID": "yourOrganizationId",
"status": "active",
"flux": "option task = { \n name: \"yourTaskName\",\n every: 3h30m,\n offset: 20m\n}\n\n",
"description": ""
}

User body sample

{
"oauthID": "000000000000aaaa",
"name": "yourUserName",
"status": "active",
"org_id": "yourOrganizationId"
}

Variable body sample

{
"orgID": "yourOrganizationId",
"name": "yourVariableName",
"description": "",
"selected": [],
"arguments": {
"type": "query",
"values": {
"query": "buckets()\n |> filter(fn: (r) => r.name !~ /^_/)\n |> rename(columns: {name: \"_value\"})\n |> keep(columns: [\"_value\"])",
"language": "flux"
}
},
"labels": []
}

3. About Delete Data:

This connector can be used to delete data records from your bucket.

DB_URL Provide your influx database host.

Token Provide your influx database access token.

Bucket_Name Provide your bucket name from which data needs to be deleted.

Org_Name Provide the organization name of the bucket.

Start_Time Provide start date-time (YYYY-MM-DDT00:00:00Z).

Stop_Time Provide stop date-time (YYYY-MM-DDT00:00:00Z).

Measurement Provide influx measurement name.

Filter Provide filter parameters to fetch records.

Following message properties can be used to override the connector properties if provided.

  • msg.payload.influxDbUrl => DB_URL
  • msg.payload.token => Token
  • msg.payload.bucketName => Bucket_Name
  • msg.payload.orgName => Org_Name
  • msg.payload.startTime => Start_Time
  • msg.payload.stopTime => Stop_Time
  • msg.payload.measurement => Measurement
  • msg.payload.filter => Filter
Influx db properties expected by the connector:
PropertyTypeRequired
DB_URLStringYes
TokenStringYes
Bucket_NameDateTimeYes
Org_NameStringYes
Start_TimeDateTimeYes
Stop_TimeDateTimeYes
MeasurementStringYes
FilterStringYes

4. About Delete Item:

This connector provides you with the feature of deleting various items from the influx database.

  • Bucket
  • Dashboard
  • Label
  • Notification Rule
  • Notofication End Points
  • Organization
  • Task
  • User
  • Variable

DB_URL Provide your influx database host.

Token Provide your influx database access token.

Item Select the item you want to delete from a provided list

Id Provide the id for the item to be deleted

Following message properties can be used to override the connector properties if provided.

  • msg.payload.influxDbUrl => DB_URL
  • msg.payload.token => Token
  • msg.payload.item => Item
  • msg.payload.id => Id
Influx DB properties expected by the connector:
PropertyTypeRequired
DB_URLStringYes
TokenStringYes
ItemStringYes
IdStringYes

5. About Get Data:

This connector can be used to retrieve data from a bucket, with the required filters.

DB_URL Provide your influx database host.

Token Provide your influx database access token.

Org_Name Provide the organization name of the bucket.

Bucket Provide influx bucket name.

Start_Time Provide start date-time (YYYY-MM-DDT00:00:00Z).

Stop_Time Provide stop date-time (YYYY-MM-DDT00:00:00Z).

Measurement Provide influx measurement name.

Filter Provide filter data to fetch records.

Limit Provide no. of limit for results.

Offset Provide no. of offset for results.

Following message properties can be used to override the connector properties if provided.

  • msg.payload.influxDbUrl => DB_URL
  • msg.payload.token => Token
  • msg.payload.orgName => Org_Name
  • msg.payload.bucket => Bucket
  • msg.payload.startTime => Start_Time
  • msg.payload.stopTime => Stop_Time
  • msg.payload.measurement => Measurement
  • msg.payload.filter => Filter
  • msg.payload.limit => Limit
  • msg.payload.offset => Offset

Sample filter data format

[{"filterKey":"measurement","filterValue":"sample measurement"}]

6. About Get Item:

This connector can be used to retrieve all the details of an item attached with an id.

  • Bucket
  • Dashboard
  • Flag
  • Label
  • Notification Rule
  • Organization
  • Query Suggestions
  • Task
  • Telegraf Plugins
  • User
  • Variable

DB_URL Provide your influx database host.

Token Provide your influx database access token.

Item Select the required item from the drop-down

Id Provide id to select the specific item from the list.

Following message properties can be used to override the connector properties if provided.

  • msg.payload.influxDbUrl => DB_URL
  • msg.payload.token => Token
  • msg.payload.item => Item
  • msg.payload.id => Id
Influx DB properties expected by the connector:
PropertyTypeRequired
DB_URLStringYes
TokenStringYes
ItemStringYes
IdStringNo

7. About Notification Endpoint List:

This connector can help you get the list of all notification endpoints for your organization.

DB_URL Provide your influx database host.

Token Provide your influx database access token.

Org_Id Provide your organization id

Id Provide id to get list against specific id.

Following message properties can be used to override the connector properties if provided.

  • msg.payload.influxDbUrl => DB_URL
  • msg.payload.token => Token
  • msg.payload.orgId => Org_Id
  • msg.payload.id => Id
Influx DB properties expected by the connector:
PropertyTypeRequired
DB_URLStringYes
TokenStringYes
Org_IdStringYes
IdStringNo

8. About Update Item:

This connector provides you the feature to update informational data (eg. description, name, etc.) of various items in the influx database.

  • Bucket
  • Dashboard
  • Label
  • Notification Rule
  • Notofication End Points
  • Organization
  • Task
  • User
  • Variable

DB_URL Provide your influx database host.

Token Provide your influx database access token.

Item Select the item you want to update from a provided list

Id Provide the id of the item to be updated

Body Provide the body query for the updation in json format

Following message properties can be used to override the connector properties if provided.

  • msg.payload.influxDbUrl => DB_URL
  • msg.payload.token => Token
  • msg.payload.item => Item
  • msg.payload.id => Id
  • msg.payload.body => Body

Bucket body sample

{
"description": "",
"name": "yourBucketName",
"retentionRules": []
}

Dashboard body sample

{
"name": "yourDashboadName",
"description": "",
"cells": [],
"labels": [],
"links": {
"self": "/api/v2/dashboards/000000000000aaaa",
"members": "/api/v2/dashboards/000000000000aaaa/members",
"owners": "/api/v2/dashboards/000000000000aaaa/owners",
"cells": "/api/v2/dashboards/000000000000aaaa/cells",
"labels": "/api/v2/dashboards/000000000000aaaa/labels",
"org": "/api/v2/orgs/000000000000aaaa"
}
}

Label body sample

{
"orgID": "yourOrganizationId",
"name": "yourLabelName",
"properties": {
"color": "F3F3F3",
"description": ""
}
}

Notification Rule body sample

{
"name": "yourNotificationRuleName",
"endpointID": "000000000000aaaa",
"orgID": "yourOrganizationId",
"ownerID": "000000000000aaaa",
"every": "10m",
"offset": "0s",
"runbookLink": "",
"statusRules": [
{
"currentLevel": "INFO",
"previousLevel": null
}
],
"channel": "",
"messageTemplate": "Notification Rule: ${ r._notification_rule_name } triggered by check: ${ r._check_name }: ${ r._message }",
"type": "slack",
"labels": [],
"status": "active"
}

Notification EndPoint body sample

{
"name": "yourNotificationEndPointName",
"description": "",
"orgID": "yourOrganizationId",
"status": "active",
"url": "https://hooks.slack.com/services/X/X/X",
"token": "",
"type": "slack",
"labels": [],
"links": {
"self": "/api/v2/notificationEndpoints/000000000000aaaa",
"labels": "/api/v2/notificationEndpoints/000000000000aaaa/labels",
"members": "/api/v2/notificationEndpoints/000000000000aaaa/members",
"owners": "/api/v2/notificationEndpoints/000000000000aaaa/owners"
}
}

Organization body sample

{
"name": "yourOrganizationName",
"description": "",
"status": "active"
}

Task body sample

{
"labels": [],
"ownerID": "000000000000aaaa",
"name": "yourTaskName",
"description": "",
"status": "active",
"flux": "option task = { \n name: \"yourTaskName\",\n every: 3h30m,\n offset: 20m\n}\n\n",
"every": "3h30m",
"offset": "20m"
}

User body sample

{
"oauthID": "000000000000aaaa",
"name": "yourUserName",
"status": "active",
"role": "owner",
"org_id": "yourOrganizationId"
}

Variable body sample

{
"orgID": "yourOrganizationId",
"name": "yourVariableName",
"description": "",
"selected": [],
"arguments": {
"type": "query",
"values": {
"query": "buckets()\n |> filter(fn: (r) => r.name !~ /^_/)\n |> rename(columns: {name: \"_value\"})\n |> keep(columns: [\"_value\"])",
"language": "flux"
}
},
"labels": []
}